package upc.condominio.edu.domain;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import upc.condominio.edu.referencia.TipoVivienda;
import javax.validation.constraints.NotNull;
import javax.persistence.Enumerated;
import upc.condominio.edu.domain.Residente;
import javax.persistence.ManyToOne;
import javax.validation.constraints.Size;

@RooJavaBean
@RooToString
@RooEntity
public class Vivienda {

    @NotNull
    @Enumerated
    private TipoVivienda tipoVivienda;

    @ManyToOne
    private Residente propietario;

    @NotNull
    @Size(max = 100)
    private String ubicacion;

    @NotNull
    @Size(max = 10)
    private String numero;

    @NotNull
    @Size(max = 50)
    private String metraje;
}
